package xyz.schwi.cels.dao;

import xyz.schwi.cels.entity.Base;
import xyz.schwi.cels.entity.Vocabulary;
import xyz.schwi.cels.entity.Word;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @author schwi
 * @date 2021/9/29 0029  10:13
 */
public interface BaseDao {
    /**
     * 查询所有单词
     *
     * @return 返回单词集合
     * @throws IOException 文件读取错误
     */
    List<Word> selectWords(String path) throws IOException;

    /**
     * 查询所有词汇
     *
     * @return 返回词汇集合
     * @throws IOException 文件读取错误
     */
    List<Vocabulary> selectVocabularies(String path) throws IOException;


    /**
     * 查询所有单词
     *
     * @return 返回单词Map集合
     * @throws IOException 文件读取错误
     */
    Map<Character, List<Word>> getWordsMap(String path) throws IOException;

    List<Base> selectHistory(String path) throws IOException;

    List<Base> selectError(String path) throws IOException;
}
